package com.hz.service.impl;

import com.hz.dao.WashMachineDao;
import com.hz.pojo.WashMachine;
import com.hz.service.WashMachineService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WashMachineServiceImpl implements WashMachineService {

    @Resource
    private WashMachineDao washMachineDao;

    @Override
    public WashMachine getFunction(Long wash_machine_id) throws Exception {
        return washMachineDao.getFunction(wash_machine_id);
    }

    @Override
    public List<WashMachine> getWashMachineList(Long washhouse_id) throws Exception {
        return washMachineDao.getWashMachineList(washhouse_id);
    }

    @Override
    public int updWashMachineState(Long wash_machine_id, Long wash_machine_state) throws Exception {

        return washMachineDao.updWashMachineState(wash_machine_id,wash_machine_state);
    }

    @Override
    public int addWashMachine(WashMachine washMachine) throws Exception {

        return washMachineDao.addWashMachine(washMachine);
    }

    @Override
    public int addWashMachineFunction(Long washingFunction_id, Long washingFunction_function_id) throws Exception {
        return washMachineDao.addWashMachineFunction(washingFunction_id,washingFunction_function_id);
    }

    @Override
    public WashMachine getNewWashingMachine(String wash_machine_install_time) throws Exception {
        return washMachineDao.getNewWashingMachine(wash_machine_install_time);
    }
}
